@font-face {
  font-family: 'Creepster';
  src: url('../assets/shadow/font/AlZy_zVUqJz4yMrniH4Rcn35.woff2') format('woff2');
}
@media screen and (max-width: 495px) {
  html {
    font-size: 5px;
  }
}
@media screen and (min-width: 495px) and (max-width: 768px) {
  html {
    font-size: 6px;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  html {
    font-size: 10px;
  }
}

@media screen and (min-width: 1025px) and (max-width: 1920px) {
  html {
    font-size: 12px;
  }
}

body {
  font-family: 'ManHua';
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;

  margin-top: 5rem;
}

.fullscreen-container {
  cursor: crosshair;
  border: 5px solid black;
  position: relative;
  box-sizing: content-box;
  /* top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); */

  width: 900px;
  /* height: 500px; */
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 9/5;
  /* 设置成0而不是具体的px, 由padding来决定高度 */
  /* height: 0; */
  /* 使用 padding-top 来维持高宽比，这里是 (500 / 900 * 100)% = 55.56% */
  /* padding-top: 55.56%; */
}
.canvas {
  cursor: crosshair;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  /* 限制宽高是为了 各种情况都能完全显示 */
  max-width: 100%;
  max-height: 100%;
  /* top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); */
}
#canvas1 {
  z-index: 10;
  font-family: 'Creepster', cursive;
}
#collisionCanvas {
  /* z-index: 100; */
  /* 隐藏填充乌鸦的色块 */
  opacity: 0;
}
img[id] {
  display: none;
}

/* 暂停文字 */
.pause__text {
  white-space: nowrap;
  cursor: pointer;
  z-index: 0;
  visibility: hidden;
  position: absolute;

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  display: flex;
  flex-direction: column;
  align-items: center;

  font-family: 'ManHua';
  text-shadow: 1px 1px 2px #fff;
}
.pause__text--1 {
  font-size: 10rem;
}
.pause__text--2 {
  font-size: 3rem;
}
.pause__text--3 {
  font-size: 4rem;
  margin-top: 5rem;
}
.pause__text--4 {
  font-size: 4rem;
  margin-top: 1rem;
}
.pause__mark {
  z-index: 1000;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  margin: auto;
  /* max-width: 100%; */
  /* max-height: 100%; */

  /* 都是纯色，模糊自然没用 */
  filter: blur(2px);
  /* 禁止操作 */
  /* user-select: none; */
}
.pause__mark::after {
  content: '';
  width: 100%;
  height: 100%;
  display: block;
  background: rgba(255, 253, 253, 0.3);
}

/* 全屏按钮 */
#restart {
  position: absolute;
  top: 10px;
  left: 10%;
  font-size: 12px;
  padding: 4px;
  transform: translateX(-50%);
}
#fullScreenButton {
  position: absolute;
  top: 40px;
  left: 10%;
  font-size: 12px;
  padding: 4px;
  transform: translateX(-50%);
}

/* 技能图标 */
.ui__skill {
  position: absolute;
  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: end;
  gap: 1rem;
}
.ui__skill .icon {
  cursor: pointer;

  position: relative;
  display: inline-block;
  height: 6rem;
  width: 6rem;
  background-size: contain;
}
.ui__skill .icon__mark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: rgba(248, 249, 250, 0.5);
}

/* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */
/* 提示框 */
.ui__skill .skill__megbox {
  visibility: hidden;
  position: absolute;
  top: calc(6rem + 3rem);
  right: 0;
  width: 15rem;
  height: 21rem;
  font-size: 1.5rem;
  background-color: transparent;
  border: 2px solid black;
  border-radius: 2rem;
  padding: 1rem 1rem;
  z-index: 100;
  box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
  transform: translateX(50%);
  background-color: rgba(0, 0, 0, 0.2); /* 设置背景颜色，可以根据需要调整透明度 */
  backdrop-filter: blur(3px); /* 可以调整模糊程度 */
}
@media screen and (min-width: 1025px) and (max-width: 1920px) {
  .ui__skill .skill__megbox {
    border: 4px solid black;
  }
}
.ui__skill .skill__megbox::before {
  content: '';
  position: absolute;
  top: -2rem;
  left: calc(50% - 1rem);

  width: 0;
  height: 0;
  border: 1rem solid;
  border-color: transparent transparent black;
}

.ui__skill .skill__megbox .megbox__title {
  position: relative;
  font-size: 2rem;
  text-align: center;
  padding: 0.5rem;
}

/* 图标部分 */
.ui__skill .skill__megbox .megbox__icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 1rem;
  padding: 1rem 0 0.5rem 0;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
  font-size: 2rem;
  line-height: 3rem;
}
.ui__skill .skill__megbox .megbox__icon div {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5%;
  padding: 0 2rem;
}
@media screen and (max-width: 769px) {
  .ui__skill .skill__megbox .megbox__icon div {
    width: 100%;
  }
}
.ui__skill .skill__megbox .megbox__icon .icon {
  cursor: help;

  width: 3rem;
  height: 3rem;
  display: inline-block;
  /* 禁止缩放 */
  flex-shrink: 0;
}
.ui__skill .skill__megbox .megbox__icon .megbox__icon--1 {
  background-image: url(../assets/shadow/svg/cd.svg);
}
.ui__skill .skill__megbox .megbox__icon .megbox__icon--2 {
  background-image: url(../assets/shadow/svg/duration.svg);
}

.ui__skill .skill__megbox .megbox__meg .megbox__txt {
  height: 4rem;
  margin: 1.5rem 0;
  font-size: 1.5rem;
  text-align: center;
  line-height: 1.5;
}

/* 背景模糊 */
/* .ui__skill .megbox__meg::after {
  z-index: 90;
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-color: rgba(0, 0, 0, 0.3); 
  filter: blur(1px); 
} */
/* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */

/* 进度条 */
.progress {
  z-index: 999;
  position: absolute;
  /* top: 20%;
  left: 30%; */
  /* transform: translate(-50%, -50%); */

  border: 0.4rem solid black;
  border-radius: 2px;

  width: 20rem;
  height: 2rem;
}
.progress__bar {
  width: 50%;
  height: 100%;
  background-color: black;
}
.progress__flag {
  position: absolute;
  left: 70%;
  /* 自身底部是空白 */
  bottom: calc(2rem - 1rem);
  background-image: url(../assets/shadow/svg/flag.svg);
  width: 4rem;
  height: 4rem;
}

/* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */
/* 提示UI */
.tip {
  white-space: nowrap;
  cursor: pointer;
  z-index: 2000;
  /* visibility: hidden; */
  position: absolute;

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  font-family: 'ManHua';
  text-shadow: 1px 1px 2px #fff;
}

.tip__toEnd {
  visibility: hidden;
  font-size: 8rem;
}
.tip__GameEnd {
  visibility: hidden;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.tip__GameEnd--1 {
  font-size: 10rem;
  margin-bottom: 2rem;
}
.tip__GameEnd--2 {
  font-size: 4rem;
}
.tip__GameEnd--3 {
  font-size: 5rem;
}
.tip__GameEnd--4 {
  font-size: 4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.tip__GameEnd--5 {
  font-size: 4rem;
}
